// JavaScript Document

function test(){
	var phone=document.getElementById("phone").value;
	var code=document.getElementById("code").value;
	if(phone==""){
		alert("请输入手机号！");
		return false;
	}
	if(code==""){
		alert("请输入验证码！");
		return false;
	}
	if(!(/^1[34578]\d{9}$/.test(phone))){ 
		alert("手机号格式不对哦");
		return false;
	}

}
var voip = (function () {
	var init,
	init=function () {
		var deviceWidth = document.documentElement.clientWidth;
        if (deviceWidth >750) deviceWidth = 750;
        document.documentElement.style.fontSize = deviceWidth / 7.5 + 'px';
		if ($('.swiper-container').length > 0) {
            ownSwiper($('.swiper-container'));
        }
    };
	/**
     * 轮播控制
     * 
     * @param {any} $contrainer 
     */
	ownSwiper = function ($contrainer) {
        var s = new Swiper($contrainer, {
            loop: true,
            autoplay: 3000,
            pagination: '.swiper-pagination'
        })
    };
    return {
        init: init,
    };
}());
window.onload=voip.init();
/*$(function () {
    voip.init();
});*/


